package com.pcj.blog.dao;
/**
 * @param
 * @author pcj
 * @date 2021/12/28 19:04
 * @return
 */

import com.pcj.blog.po.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 *
 * @className TagService
 * @author pengcj
 * @date 2021/12/28 19:04
 */

public interface TagRepository extends JpaRepository<Tag,Long> {
    Tag findByName(String name);
    @Query(" select t from Tag  t")
    List<Tag> findTop(Pageable pageable);
}
